﻿using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZuesUI.Models;

namespace ZuesUI.ViewModels
{
    public class DataGridViewModel : BindableBase
    {
        //初始化了读取数据的列表
        private ObservableCollection<InterfaceReciveDataModel> _dataitems = new ObservableCollection<InterfaceReciveDataModel>()
        {
            new InterfaceReciveDataModel(){Name = "第一层",Address = "DBD82.DBDW38",DbIndex = 82,DbDataIndex = 38},
            new InterfaceReciveDataModel(){Name = "第二层",Address = "DBD63.DBDW154",DbIndex = 63,DbDataIndex = 154},
            new InterfaceReciveDataModel(){Name = "第三层",Address = "DBD63.DBDW24",DbIndex = 63,DbDataIndex = 24},
            new InterfaceReciveDataModel(){Name = "第四层",Address = "DBD63.DBDW88",DbIndex = 63,DbDataIndex = 88},
            new InterfaceReciveDataModel(){Name = "第五层",Address = "DBD63.DBDW114",DbIndex = 63,DbDataIndex = 114},
            new InterfaceReciveDataModel(){Name = "Kp",Address = "DBD63.DBDW0",DbIndex = 63,DbDataIndex = 0},
            new InterfaceReciveDataModel(){Name = "Ki",Address = "DBD63.DBDW4",DbIndex = 63,DbDataIndex = 4},
            new InterfaceReciveDataModel(){Name = "Kd",Address = "DBD63.DBDW8",DbIndex = 63,DbDataIndex = 8},
              new InterfaceReciveDataModel(){Name = "温度",Address = "DBD82.DBDW38",DbIndex = 82,DbDataIndex = 38},
            new InterfaceReciveDataModel(){Name = "功率",Address = "DBD63.DBDW154",DbIndex = 63,DbDataIndex = 154},
            new InterfaceReciveDataModel(){Name = "目标温度",Address = "DBD63.DBDW24",DbIndex = 63,DbDataIndex = 24},
            new InterfaceReciveDataModel(){Name = "功率上限",Address = "DBD63.DBDW88",DbIndex = 63,DbDataIndex = 88},
            new InterfaceReciveDataModel(){Name = "积分隔离",Address = "DBD63.DBDW114",DbIndex = 63,DbDataIndex = 114},
            new InterfaceReciveDataModel(){Name = "Kp",Address = "DBD63.DBDW0",DbIndex = 63,DbDataIndex = 0},
            new InterfaceReciveDataModel(){Name = "Ki",Address = "DBD63.DBDW4",DbIndex = 63,DbDataIndex = 4},
            new InterfaceReciveDataModel(){Name = "Kd",Address = "DBD63.DBDW8",DbIndex = 63,DbDataIndex = 8},
              new InterfaceReciveDataModel(){Name = "温度",Address = "DBD82.DBDW38",DbIndex = 82,DbDataIndex = 38},
            new InterfaceReciveDataModel(){Name = "功率",Address = "DBD63.DBDW154",DbIndex = 63,DbDataIndex = 154},
            new InterfaceReciveDataModel(){Name = "目标温度",Address = "DBD63.DBDW24",DbIndex = 63,DbDataIndex = 24},
            new InterfaceReciveDataModel(){Name = "功率上限",Address = "DBD63.DBDW88",DbIndex = 63,DbDataIndex = 88},
            new InterfaceReciveDataModel(){Name = "积分隔离",Address = "DBD63.DBDW114",DbIndex = 63,DbDataIndex = 114},
            new InterfaceReciveDataModel(){Name = "Kp",Address = "DBD63.DBDW0",DbIndex = 63,DbDataIndex = 0},
            new InterfaceReciveDataModel(){Name = "Ki",Address = "DBD63.DBDW4",DbIndex = 63,DbDataIndex = 4},
            new InterfaceReciveDataModel(){Name = "Kd",Address = "DBD63.DBDW8",DbIndex = 63,DbDataIndex = 8},
              new InterfaceReciveDataModel(){Name = "温度",Address = "DBD82.DBDW38",DbIndex = 82,DbDataIndex = 38},
            new InterfaceReciveDataModel(){Name = "功率",Address = "DBD63.DBDW154",DbIndex = 63,DbDataIndex = 154},
            new InterfaceReciveDataModel(){Name = "目标温度",Address = "DBD63.DBDW24",DbIndex = 63,DbDataIndex = 24},
            new InterfaceReciveDataModel(){Name = "功率上限",Address = "DBD63.DBDW88",DbIndex = 63,DbDataIndex = 88},
            new InterfaceReciveDataModel(){Name = "积分隔离",Address = "DBD63.DBDW114",DbIndex = 63,DbDataIndex = 114},
            new InterfaceReciveDataModel(){Name = "Kp",Address = "DBD63.DBDW0",DbIndex = 63,DbDataIndex = 0},
            new InterfaceReciveDataModel(){Name = "Ki",Address = "DBD63.DBDW4",DbIndex = 63,DbDataIndex = 4},
            new InterfaceReciveDataModel(){Name = "Kd",Address = "DBD63.DBDW8",DbIndex = 63,DbDataIndex = 8},
        };
        public ObservableCollection<InterfaceReciveDataModel> DataItems
        {
            get { return _dataitems; }
            set
            {
                SetProperty(ref _dataitems, value);
            }
        }

        public DataGridViewModel() 
        {
        
        
        }
    }
}
